package com.myweb.dao.sys.impl;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;
import com.myweb.dao.common.CBaseDaoImpl;
import com.myweb.dao.sys.ISysUserDao;
import com.myweb.entity.sys.SysUser;
/**
 * 
 * @TODO 用户Dao实现类
 * @author roye
 * @date Apr 17, 2013 11:43:59 AM
 * @version V1.0
 */
@Repository
public class CSysUserDaoImpl extends CBaseDaoImpl<SysUser,Integer> implements ISysUserDao {

	private static final Log log = LogFactory.getLog(CSysUserDaoImpl.class);
	/**
	 * 登录查询
	 */
	public SysUser getSysUser(String username, String pwd)
			throws DataAccessException {
		StringBuffer sql = new StringBuffer();
		sql.append("select * from sys_user su where su.loginName='"+username +"' and su.userPwd='"+pwd+"'");
		return this.getObjectByCondition(sql);
	}

	

}
